Page({
  data: {
    balance: 0,
    transactions: []
  },

  onLoad() {
    // 模拟数据，实际应该从服务器获取
    this.setData({
      balance: 1280.50,
      transactions: [
        {
          id: 1,
          type: 'expense',
          amount: 120,
          title: '在线问诊-张医生',
          date: '2024-01-15 14:30'
        },
        {
          id: 2,
          type: 'recharge',
          amount: 500,
          title: '余额充值',
          date: '2024-01-14 10:20'
        },
        {
          id: 3,
          type: 'expense',
          amount: 99.50,
          title: '购买药品',
          date: '2024-01-13 16:45'
        }
      ]
    })
  },

  // 充值
  handleRecharge() {
    wx.showModal({
      title: '充值提示',
      content: '暂未开放充值功能',
      showCancel: false
    })
  },

  // 提现
  handleWithdraw() {
    wx.showModal({
      title: '提现提示',
      content: '暂未开放提现功能',
      showCancel: false
    })
  }
}) 